import request from "@/utils/request";

export function preUploadGroupFile() {
}

// 查询存储空间用户
// 获取群组1
export function  getmyGroup(query) {
  return request({
    url: `/netdisk/group/myGroup`,
    method: "get",
    params:query
  });
}
// 获取群组（搜索）
export function  getGroupList(query) {
  return request({
    url: `/netdisk/group/list`,
    method: "get",
    params:query
  });
}
// 创建群组
export function  createGroup(data) {
  return request({
    url: `/netdisk/group/createGroup`,
    method: "post",
    data
  });
}
// 群设置
export function  editGroupSettings(data) {
  return request({
    url: `/netdisk/group/editGroupSettings`,
    method: 'put',
    data
  });
}
// 邀请群成员
export function  inviteUser(data) {
  return request({
    url: `/netdisk/group/inviteUser`,
    method: 'post',
    data
  });
}
// 获取群成员
export function  GroupmemberList(query) {
  return request({
    url: `/netdisk/group/memberList`,
    method: "get",
    params:query
  });
}
// 移除群成员
export function  batchMoveUser(data) {
  return request({
    url: `/netdisk/group/batchMoveUser`,
    method: 'delete',
    data
  });
}
export function  getGroupDetail(query) {
  return request({
    url: `/netdisk/group/detail`,
    method: "get",
    params:query
  });
}
// 获取群文件
export function  getGroupFileList(query) {
  return request({
    url: `/netdisk/groupFile/list`,
    method: "get",
    params:query
  });
}
// 搜索群文件
export function  SearchGroupFileList(query) {
  return request({
    url: `/netdisk/groupFile/search`,
    method: "get",
    params:query
  });
}
// 创建群文件夹
export function  GroupcreateFolder(data) {
  return request({
    url: `/netdisk/groupFile/createFolder`,
    method: "post",
    data
  });
}
// 群文件重命名
export function  GrouprenameFile(data) {
  return request({
    url: `/netdisk/groupFile/renameFile`,
    method: "put",
    data
  });
}
// 删除
export function  GroupbatchDeleteFile(data) {
  return request({
    url: `/netdisk/groupFile/batchDeleteFile`,
    method: "delete",
    data
  });
}
// 复制
export function  GroupcopyFile(data) {
  return request({
    url: `/netdisk/groupFile/copyFile`,
    method: "post",
    data
  });
}
// 移动
export function  GroupmoveFile(data) {
  return request({
    url: `/netdisk/groupFile/moveFile`,
    method: "post",
    data
  });
}
// 获取文件数
export function  getGroupFilePathTree(query) {
  return request({
    url: `/netdisk/groupFile/getFilePathTree`,
    method: "get",
    params:query
  });
}
// 查询群文件详情
export function  getGroupFiledetail(id) {
  return request({
    url: `/netdisk/groupFile/detail/${id}`,
    method: "get",
  });
}
// 上传本地文件
export function  realuploadGroupFile(data) {
  return request({
    url: `/netdisk/fileTransfer/uploadGroupFile`,
    method: "post",
    data
  });
}
// 群组配置弹窗
export function  groupConfigInfo(query) {
  return request({
    url: `/netdisk/storage/config/group/configInfo`,
    method: "get",
    params:query
  });
}
// 批量修改群配置
export function  batchEditStorageConfig(data) {
  return request({
    url: `/netdisk/storage/config/group/batchEditStorageConfig`,
    method: "put",
   data
  });
}
//群组成员列表
export function  getmemberList(query) {
  return request({
    url: `/netdisk/storage/config/group/memberList`,
    method: "get",
   params:query
  });
}
// 获取自己群身份
export function  getGroupUserInfo(query) {
  return request({
    url: `/netdisk/group/getGroupUserInfo`,
    method: "get",
    params:query
  });
}
// 获取群组用户树
export function  groupUserTree(query) {
  return request({
    url: `/netdisk/common/groupUserTree`,
    method: "get",
    params:query
  });
}
// 上传我的网盘文件到群文件
export function  uploadMyFileToGroup(data) {
  return request({
    url: `/netdisk/fileTransfer/uploadMyFileToGroup`,
    method: "post",
   data
  });
}
// 转让群主
export function  transferMaster(data) {
  return request({
    url: `/netdisk/group/transferMaster`,
    method: "put",
    data
  });
}
// 退群
export function  leaveGroup(groupId) {
  return request({
    url: `/netdisk/group/leave/${groupId}`,
    method: "delete",
  });
}
// 解散群
export function  disbandGroup(groupId) {
  return request({
    url: `/netdisk/group/disband/${groupId}`,
    method: "delete",
  });
}
// 操作管理员
export function  setManager(data) {
  return request({
    url: `/netdisk/group/setManager`,
    method: "put",
    data
  });
}
// 修改群头和名称
export function  editGroup(data) {
  return request({
    url: `/netdisk/group/editGroup`,
    method: "put",
    data
  });
}
